using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;

namespace Old.KenEgozi.Com.Domain.Blog
{
	public class BlogBase<T> : ActiveRecordBase<T>
	{
		protected int _id;
		protected DateTime _creationDate = DateTime.Now.ToUniversalTime();
		protected DateTime _updateDate = DateTime.Now.ToUniversalTime();

		[PrimaryKey(Access = PropertyAccess.NosetterCamelcaseUnderscore)]
		public virtual int Id
		{
			get { return _id; }
		}
		[Property(Access = PropertyAccess.NosetterCamelcaseUnderscore)]
		public virtual DateTime CreationDate
		{
			get { return _creationDate; }
		}
		[Property(Access = PropertyAccess.NosetterCamelcaseUnderscore)]
		public virtual DateTime UpdateDate
		{
			get { return _updateDate; }
		}

		public override void Update()
		{
			//_updateDate = DateTime.Now.ToUniversalTime();
			base.Update();
		}
		public override void UpdateAndFlush()
		{
			//_updateDate = DateTime.Now.ToUniversalTime();
			base.UpdateAndFlush();
		}

	}
}
